<template>
  <div class="mask">
    <div class="con">{{ msg }}成功</div>
  </div>
</template>

<script>
// setTimeout(() => {
//   this.isShow = false;
// }, 2000);

export default {
  props: ["msg"],
  mounted() {
    //console.log("我要开启定时器");
    setTimeout(() => {
      //this.isShow = false;
        console.log('我要关闭弹框')
        this.$emit('hide')
    }, 2000);
  },
};
</script>

<style scoped>
.mask {
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.3);
  position: absolute;
  top: 0;
  left: 0;
}
.mask .con {
  width: 200px;
  height: 100px;
  background-color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
</style>